import Validator from './validate.js'
export const checkCommon = (type) => {
    return (value) => {
        const obj = { 
            strategy: type
        }
        let validator = new Validator();
        validator.add(value, [obj]);
        return validator.start();
    }
}

export const checkMobile = (value) => {
    return checkCommon('telMobile')(value)
}

export const checkName = (value) => {
    console.log('进来了没');
    return checkCommon('userNameShen')(value)
}

export const checkIdNo = (value, type) => {
    return checkCommon(type)(value)
}
